package com.sptpc.stu.model.my;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.sun.istack.NotNull;
import lombok.*;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UpdateTimestamp;

import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDate;

/**
 * 学生的实体类
  */
@Entity
@Table(name = "table_user")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class User implements Serializable {


    @Id
    @NotNull
//    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long uid; // 用户号

    private String name; // 姓名

    private String avatar; // 头像

    private Boolean gender; // 性别

    private String address; //常住地

    private String profession; //职业

    private String accountPhone; //手机号

    private String password;    //密码

    private String tag; //个签

    private String major;   //班级专业

    private String email;   //邮箱

    @CreationTimestamp
    private LocalDate enrollDate; // 创建记录时间

    private LocalDate birthDate;  // 生日

    @UpdateTimestamp
    private LocalDate updateDate;




}
